<!DOCTYPE html>
<html>
<head>
    <title>绘制一个T字</title>
    <style>
        canvas {
            border: 1px solid #000;
        }
    </style>
</head>
<body>
    <canvas id="myCanvas" width="16" height="16"></canvas>

    <script>
        // 获取canvas元素和上下文
        const canvas = document.getElementById('myCanvas');
        const ctx = canvas.getContext('2d');

        // 设置填充样式为红色
        ctx.fillStyle = '#ff0000';

        // 绘制反转T字的横线
        ctx.fillRect(0, 8, 16, 1);

        // 绘制反转T字的竖线
        ctx.fillRect(8, 1, 1, 7);
    </script>
</body>
</html>
